import { getRequest, postRequest, putRequest, deleteRequest } from '/src/lib/axios';
const baseUrl = "/api/plat/ais-dynamic"

export const api = {
  // 分页查询
  queryPage: (param = {}) => {
    return getRequest({
      url: baseUrl + '/page',
      params: param
    });
  },

  // list查询
  queryList: (param = {}) => {
    return getRequest({
      url: baseUrl + '/list',
      params: param
    });
  },

  // 增加
  add: (param) => {
    return postRequest({
      url: baseUrl,
      data: param,
    });
  },

  // 修改
  update: (param) => {
    return putRequest({
      url: baseUrl,
      data: param,
    });
  },

  // 删除
  delete: (id) => {
    return deleteRequest({
      url: baseUrl + "/" + id,
    });
  },

  // 最后点的列表
  getListLast: () => {
    return getRequest({
      url: baseUrl + "/list/last",
    });
  },
};
